-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add using skipClient.balances #259
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we limit digits after comma to 4 for the balance
import { BigNumber } from "bignumber.js"; | ||
|
||
|
||
const ETH_GAS_FEE = 0.1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be 0.01 or 10 * 10 ** 16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a little easier to understand if we keep the value in terms of how much ETH and then convert it to the tokenAmount using a util like this:
convertHumanReadableAmountToCryptoAmount(ETH_GAS_FEE)
but I do need to pass the correct decimals which i forgot to do
|
||
switch (chainType) { | ||
case "evm": | ||
return Number(convertHumanReadableAmountToCryptoAmount(ETH_GAS_FEE)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to pass decimals from source details, we are not sure every evm native asset is 18 decimals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codingki gotcha so we are always subtracting 0.01 of the source asset from the max to make space for gas
Add using skipClient.balances
Use devApiUrl
Fix invertSwapAtom logic
Add EVM warning
Widget.-.Widget.Storybook.-.19.September.2024.mp4
Ensure that debouncing still works when inverting source/dest
Widget.-.Widget.Storybook.-.19.September.2024.1.mp4